home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
bix03.arc
/
SAVE.SYS
< prev
next >
Wrap
Text File
|
1986-08-04
|
3KB
|
72 lines
(********************************************************************)
(* *)
(* DISPLAY AND WINDOW DISK I/O UTILITIES *)
(* *)
(* Assist in the storage and retrieval of display screens, *)
(* display stacks, windows, and window stacks. *)
(* *)
(* *)
(* *)
(* written by: John Leonard 1/9/86 *)
(* *)
(* NOT FOR SALE WITHOUT WRITTEN PERMISSION *)
(* *)
(********************************************************************)
procedure SaveDisplay( DisplayNo : integer; filename: Window_Big_String);
var
displayrec : Display_Record;
displayfile : file of Display_Record;
begin
assign(displayfile,filename);
{i-} rewrite(displayfile) {i+};
if IOResult <> 0 then begin
WindowExit;
writeln;
writeln('Fatal Error ReWriting Displayfile ',filename,'.');
halt;
end;
if DisplayStack[DisplayNo] <> nil then begin
move( CurrentScreenData.windowloc[displayno],
displayrec.info,
sizeof( CurrentScreenData.windowloc[displayno]));
move( DisplayStack[DisplayNo]^,
displayrec.data,
sizeof( DisplayStack[DisplayNo]^));
write(displayfile,Displayrec);
end;
close(displayfile);
end;
procedure LoadDisplay( DisplayNo : integer; filename: Window_Big_String);
var
displayrec : Display_Record;
displayfile : file of Display_Record;
begin
assign(displayfile,filename);
{i-} reset(displayfile) {i+};
if IOResult <> 0 then begin
WindowExit;
writeln;
writeln('Fatal Error: ',filename,' doesn''t exist.');
halt;
end;
if DisplayStack[DisplayNo] = nil then
ClearPage(DisplayNo);
read( displayfile,DisplayRec);
move( displayrec.info,
CurrentScreenData.windowloc[DisplayNo],
sizeof(displayrec.info) );
move( displayrec.data,
DisplayStack[DisplayNo]^,
sizeof( displayrec.data) );
close(displayfile);
end;